<template name="tpl2">
	<div class="tpl2-wrap">
      <div v-for="(ite, index) in item" :key="index" class="tpl2-left">
        <div class="tpl2-title">
          {{ ite.bed_code }}床
          <el-tag
            size="mini"
            :type='ite.status == 1
                ? "info"
                : ite.status == 2
                ? "succes"
                : "warning"'
             style="cursor: pointer;"
             @click="handleElderDetail(ite.id)"
          >
            {{
              ite.status == 1
                ? "床位空闲"
                : ite.status == 2
                ? "有人入住"
                : "有人预约"
            }}
           </el-tag>
         </div>
        <!-- <div class="tpl2-content">
            <span>刘振好</span>
            <span>男</span>
            <span>78</span>
        </div> -->
        <div class="tpl2-action">
          <span :data-id="ite.id" @click="handleEquip"> 设备管理 </span>
          <span :data-id="ite.id" @click="handleNurse"> 护工管理 </span>
        </div>
      </div>
	</div>
</template>

<script>
  import dictData from "@/utils/dictionary";
  const dict = dictData;
  import mixin from './mixin.js';
	export default {
    name: "Tpl1",
    mixins: [mixin],
    props:{
      item: {
        type: Array,
        default: () => []
      }
    },
	}
</script>
<style lang="scss" scoped>
  .tpl2-wrap{
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dddfe7;
    border-top: none;
    display: flex;
    justify-content: space-between;
    overflow-x: scroll;
    .tpl2-left{
      width: 50%;
      padding: 10px;
      &:nth-child(n+2){
        border-left: 1px solid #dddfe7;
      }
    }
    .tpl2-title{
      // color: #F60;
      font-size: 16px;
      // font-weight: bold;
      text-align: center;
    }
    .tpl2-content{
      display: flex;
      justify-content: space-between;
      margin: 10px;
    }
    .tpl2-action{
      display: flex;
      justify-content: space-between;
      // color: #1791ff;
      margin-top: 20px;
      span{
        cursor: pointer;
        &:hover{
          color: #1791ff;
        }
      }
    }
    .elderWrapper {
      display: flex;

      .elderAvatar {
        display: flex;
        flex: 0 0 200px;
        align-items: center;
        width: 200px;
        height: 200px;
        margin-right: 20px;
        overflow: hidden;
        border-radius: 5px;

        img {
          width: 100%;
          height: 100%;
        }
      }

      .elderInfo {
        p {
          width: 202px;
          overflow: hidden;
          font-style: 14px;
          line-height: 24px;
          color: #fff;
          text-overflow: ellipsis;
          white-space: nowrap;

          span {
            color: #2cc1bb;
          }
        }
      }
    }
  }
</style>
